package com.logistics.erp.entity.domain;

import com.logistics.material.entity.model.MaterialPickSave;
import lombok.Data;

@Data
public class ErpFlow {

    // 任务单号
    private String shopOrder;

    // 流向工位编号(班组）
    private String wcCode;
    // 流向工位(班组）
    private String wcName;
    // 客户名称
    private String  customerName;

    private String opNo;
    // 工作令号
    private String workNo;
    // 工序部门编号
    private String deptCodeWc;
    // 工序部门
    private String deptNameWc;
    // 需求数量
    private Integer planQty;
    // 下序开工时间
    private String startDate;

    private String endLocation;

    private String endLocationName;


    public ErpFlow(){}

    public ErpFlow(MaterialPickSave save){
        this.shopOrder = save.getTaskNo();
        this.wcCode = save.getWcCode();
        this.wcName = save.getWcName();
        this.opNo = save.getItemOpNo();
        this.deptCodeWc = save.getDeptCode();
        this.deptNameWc = save.getDeptName();
        this.startDate = save.getNextStartDate();
        this.endLocation = save.getEndPointCode();
        this.endLocationName = save.getEndPoint();
    }

    public static ErpFlow build(String wcCode){
        ErpFlow erpFlow = new ErpFlow();
        erpFlow.setWcCode(wcCode);
        return erpFlow;
    }

    public static ErpFlow build(MaterialPickSave save){
        return new ErpFlow(save);
    }
}
